//获得道具角色下面的道具提示脚本
cc.Class({
    extends: cc.Component,

    properties: {

    },

    initData: function (type) {
        let label = this.getComponent(cc.Label);
        if (type == 0) {
            label.string = "SPEED UP";
        } else if (type == 1) {
            label.string = "POWER UP";
        } else if (type == 2) {
            label.string = "MULTI SEND";
        }
    },

    // LIFE-CYCLE CALLBACKS
    onLoad() {
        let initY = this.node.y;
        this.node.runAction(cc.sequence(cc.moveTo(0.5, cc.v2(this.node.x, initY - 30)), cc.moveTo(0.5, cc.v2(this.node.x, initY))
            , cc.callFunc(function () {
                //直接移除这个
                this.node.destroy();

            }.bind(this), this)));
    },

    start() {

    },

    // update (dt) {},
});
